﻿using System;
using System.Management;
using System.Text;

namespace JiaBao.WPF.Framework.SN
{
    /// <summary>
    /// 注册码
    /// </summary>
    public class Register
    {

        public bool IsTest { get; set; }

        /// <summary>
        /// 硬盘码
        /// </summary>
        public string Key { get; set; }

        /// <summary>
        /// 注册码
        /// </summary>
        public string Sn { get; set; }

        public string LocalSn { get; set; }

        /// <summary>
        /// 验证
        /// </summary>
        /// <returns></returns>
        public bool Verification()
        {
            if (IsTest)
                return Convert.ToDouble ( Sn)  <= Convert.ToDouble ( LocalSn);
            else
                return Sn == LocalSn;
        }
    }
}
